This freeware utility consists of two items working together — i.e., [1] a system extension (INIT) + background-only application (BOA) combo file, and [2] a companion control panel (CP) file — and is designed for use under Mac OS 8.5 – 9.2.x. It strives to complement the functionality provided by the '(Remember) Recent ...' features of the standard Apple Menu Options (AMO) CP included in Mac OS Classic versions, or of the powerful third-party Apple Menu and Open/Save dialogue enhancers such as Fabien Octave's BeHierarchic CP (<http://www.octave.net/BeHierarchic/>) and St. Clair Software's Default Folder CP (<http://www.stclairsoft.com/DefaultFolder>), etc. Specifically, it keeps track of local or remote folders that were recently closed (rather than opened), including folders which had been opened directly in the Finder itself.
Background:
There are a few minor limitations in utilities such as AMO (or even BeHierarchic, Default Folder, etc.). These CPs cannot usually remember certain recent items in "converse", i.e., local or remote folders that have been recently closed. They also do not usually allow "extended" tracking, i.e., remembering folders that were opened directly in the Finder itself. The Closed Folders (CF) utility is for anyone who'd like to have this combined "converse" & "extended" memory.
A typical scenario would be that you've been busy opening lots of local and/or remote folders in the Finder (or via the Apple Menu, etc.), and have been working with their contents for a while, perhaps window-shading some of them to reduce the clutter. At some point, you accidentally closed one of those folder windows (especially one that had been opened long ago at the start of the work session). Then, you discovered that you couldn't easily reopen it because it's no longer in the Recent Folders/Servers lists (i.e., it's been "pushed out" by more recently opened ones), or perhaps it was never put there at all because it was opened directly in the Finder. If that local or remote folder is buried several levels deep in its parent volume, it can be quite a frustrating task to dig it out all over again (even if you use the Finder's 'Spring-loaded folders' feature, or BeHierarchic's wonderful "Deep Level" contextual menu & Apple Menu capabilities, etc.), particularly if you can't remember exactly where that folder is located!
A workaround for this snag would be first to identify those local & remote folders which are the most painful to "lose", and then to use some mechanism to remember them. For instance, you could do one or more of the following:-
◊ Convert some or all of the folder windows into Pop-up or "tabbed" windows.
◊ Simply increase the item-limits for AMO's (or BeHierarchic's or Default Folder's) Recent Folders/Servers options; this would be applicable to folders that are opened via some means other than directly in the Finder.
◊ Place aliases to entire volumes in the Apple Menu (an especially useful option with BeHierarchic, which avoids the slowdowns prevalent with AMO); this would work well for folders whose locations are well-known.
◊ Manually create the corresponding aliases, or add those folders to your Favourite items, or record/write AppleScript scripts to allow reopening them instantly. The aliases and scripts could be kept somewhere convenient (e.g., on the desktop, or in the Favourites menu, or in the Scripts subfolder of the active System Folder for use with Leonard Rosenthol's OSA Menu utility).
There are many other possible approaches, involving varying degrees of manual labour and/or the fine-tuning of features in the Mac OS itself or in your favourite third-party utilities. Depending on your computing habits & work flows, any of these approaches could be an eminently workable solution. If not, CF offers an alternative solution.
CF Minusses: At this point, we should mention that there are quite a few drawbacks with CF. For one thing, you'd be loading yet another system extension, with all the myriad potential conflicts that accompany these little critters. Also, CF is not very useful if you like to tunnel down through folders in the Finder (e.g., via the 'option + command + down-arrow' or 'option + File|Open' sequences, or via the Finder's 'Spring-loaded folders' feature), automatically closing the intermediate "parent" windows. Unfortunately, CF would faithfully track all those auto-closed parents, which could quickly render its cache useless. [Although, it is possible to work around this latter issue. E.g., you could temporarily bypass CF by pressing certain keys.]
CF Plusses: However, if you have a habit of accidentally closing difficult-to-resurrect folder windows that you need again almost immediately, then CF could be just the ticket. And, for those of you using Mac OS 9.x, it's worth mentioning that CF is also Multiple-Users–savvy.
Let your decision be guided by your specific needs and your level of tolerance for potential havoc. ;-)
Details
The Closed Folders (CF) utility consists of two PPC-native or accelerated units which work together:-
Closed Folders Extension [INIT+BOA combo file], which contains the INIT code-resource along with custom "trap patch" code-resources which are "installed" by the INIT code. [Note that, currently, the BOA code portion is not actually used; for further details, please see the Known Problems section.] It provides no user interface (other than posting a notification when a severe error occurs), but rather does its work "behind the scenes". It has the following icon, which is displayed in the Finder (this is also the icon which is displayed during the "icon march" of the bootup stage, if the INIT code loads and executes successfully):
On the other hand, if the INIT code encounters a problem when it tries to execute during the bootup stage (or if you deliberately bypass its loading via one of the methods specified in the Disabling or bypassing the CF Extension subsection below), then the following "X"'ed icon would be displayed instead, and the CF utility would not be active:
Closed Folders [CP file], which provides the user interface that allows you to easily set preferences for the CF utility. It is opened via any of the usual methods (double-clicking, File|Open, etc.). It has the following icon, which is displayed in the Finder:
Of these two files, the CF Extension is the more important one, at least from an operational viewpoint. In fact, if the default preferences are appropriate for you, there is no need to run the CF CP at all! The operational details for each file are given in the next subsections.
Closed Folders Extension: Operation
The CF Extension file works invisibly behind the scenes, retaining the current settings or preferences in memory. Most importantly, it also installs a few custom patches to the standard routines in the Mac OS' Window Manager Application Programming Interface (API). It is these custom patches which do the actual work of tracking closed folders.
In general, CF tracks all eligible closing folders. However, a folder would be excluded if any of these conditions applies:-
° You explicitly press a "bypass key" (as described in the 'Disabling or bypassing the CF Extension' subsection next).
° The folder is the CF alias-cache folder itself, or is the active Trash folder
° The folder is — or is located inside — a "package" folder.
° The folder resides on a local removable ("ejectable") volume such as a floppy disk, an Iomega Zip disk, or even a mounted Self Mounting Image (SMI or '.smi') "disk";
° The folder is a "root" or top-level folder of a local volume.
NOTE: Several of the above implicit exclusions can be overridden via the CF CP's 'More Options' pane, as described later below.
For full "under-the-hood" details on the CF Extension's operation, please see the separate 'CF Extension Technical Details' document, which provides an exhaustive description.
Disabling or bypassing the CF Extension
If during the bootup stage, you wish or need to permanently deactivate the CF Extension (i.e., the equivalent of turning 'Off' the Master control via the CF CP) — or if afterwards during normal operations, you wish or need to temporarily bypass CF for one or more specific instances of closing folders — you could use the follwing methods:
◊ Permanently deactivating CF, during the bootup stage
To permanently disable CF during the bootup stage, press (and keep holding down) either the left or right control key, OR either the left or right option key, OR the mouse left-button at any time before the CF Extension is due to appear onscreen in the "icon march". Release the key or button after the CF Extension has appeared with a red "X"'ed icon.
◊ Tempoorarily bpassing CF during normal operation (post-bootup stage)
To temporarily bypass CF during normal operations, hold down the esc(ape) key, OR either the left or right control key. Which bypass key is more appropriate often depends on exactly how you're closing or auto-closing the folder window(s).
If you're using a means that doesn't depend on a highlighted selection (e.g., you're clicking a window's close-box, or you're pressing the W keystroke), then hold down the escape key. (because the control key would cause the click to be misinterpreted as a contextual-menu request, or would otherwise interfere with the keystroke).
On the other hand, if you're about to tunnel down via the (command + option + down-arrow) keystroke, where the initial opening folder is currently highlighted, then hold down the control key (because the escape key would unhighlight the selection).
Note that, if you're tunneling down via the Finder's 'Spring-loaded folders' feature, it doesn't much matter which bypass key you use. Also, the bypass key must be held down until all of the windows that you wish to ignore are in fact closed (e.g., this can take a while with a remote volume over a slow connection.)
Closed Folders [CP]: Operation
When you open the CF CP for the first time, you should see the a window or "dialogue" similar to the following illustration:
As you can see, at top left of the CP window, there is a Product information group. It includes a URL item that points to the author's home page on the World Wide Web. If you are have an active Internet connection, you could click the URL to go directly to the home page via the web browser that you've set up with the standard Internet CP or the older Internet Config utility.
Apart from at the Product information group, there are just four other major sections or groups:-
• Master ('On' / 'Off') control
• Number of folders to track
• Home of the "alias cache" folder
• More Options (via the associated disclosure triangle)
These four major groups are discussed in the respective subsections below.
IMPORTANT:
Please note that any changes you make to the CP settings are not "live"; they will take effect only when the CP is closed or quit. This gives you an opportunity to change your mind and revert to the former settings, if you so desire, before closing or quitting the CP. Unfortunately, in the current version of Closed Folders, you will have to manually revert any changes yourself; an "undo" feature is not yet implemented. [See also the Known Problems section for other issues.]
Also, note that the CF CP reads your initial settings from, and writes your final settings to, a preferences file named 'Closed Folders Preferences' in the active Preferences folder; the prefs file is automatically created if it doesn't already exist. Moreover, apart from the CF CP, the CF Extension could also dynamically update the settings on the fly, in response to changes in the environment. For instance, if you manually move the alias-cache folder to a different location on the same volume, the custom CloseWindow patch will attempt to resolve the new location the next time it's triggered, and will try to update the prefs file accordingly. [BTW, in the current version of the CF utility, the CF Preferences must always be a "real" file, not an alias!]
◊ Master ('On' / 'Off') control:
This group needs almost no explanation. ;-) Click the 'Off' radio button to prevent the CF Extension from tracking closed folders. Or, click the 'On' radio button to start tracking closed folders again. As mentioned above, remember that the change will take effect only when you close or quit the CP.
◊ Number of folders to track:
This group is used to specify the maximum number of closed folders you wish to track. You could type a new number within the indicated range into the edit field, as usual:
Or, you could use the step-button control to increase or decrease the number ; note that both of the arrows "wrap around"):
Or, you could use the pop-up menu control to select a new number (however, the choices are quite limited in the pop-up menu):
As mentioned above, remember that any new "folder limit" will take effect only when you close or quit the CP.
◊ Home of the "alias cache" folder:
This group is used to specify the home (or "parent folder") of the alias-cache folder. [Recall that the alias-cache folder stores alias files corresponding to the recently closed folders so that they can be quickly reopened.] The radio button items in the group allow you to set the current home, and the "path display" item at the bottom of the group always indicates the full pathname for the current home.
Note that alias-cache folder itself is named 'Recent Folders (Closed)' by default, although after it is created you could manually rename it if you wish.
When the CF CP is opened for the first time, the 'Apple Menu' radio button is selected, by default. Usually, you will want to keep the alias-cache folder in the Apple Menu, i.e., in the currently active Apple Menu Items (AMI) folder. This would allow you to easily navigate to the cached alias files from the Apple menu (assuming that you have a utility that enables hierarchical submenus in the Apple Menu, such as the above-mentioned AMO CP, or BeHierarchic CP, etc.) However, you could choose a new custom home for the alias-cache folder if for any reason you wish or need to do so. For instance, perhaps you use a utility such as Benoît Widemann's Alias Menu CP that can provide menu-access to arbitrary folders. Or, perhaps you are a Limited user in a Mac OS 9 Multiple Users (MU) configuration [normally, MU does not allow Limited and Panels users to write to their own AMI folders (!)].
To choose a custom home for the alias-cache folder, click the 'Custom…' button (or, alternatively, click the unlabeled 'Custom' radio-button next to it):
A standard "Choose Folder" dialogue will appear — either s l o w l y in the Navigation Services flavour (by default), or instantly in the older Standard File flavour (if you have disabled Navigation Services via a third-party utility such as Default Folder) — and you could then choose a different folder to be the new home (or "parent folder") of the alias-cache folder:
[IMPORTANT: Currently, the CF utility does not "pre-filter" the list. Please restrict yourself to choosing only locations on volumes that have all of the following characteristics:- local (non-networked), fixed (non-removable), writeable (non-CDROM, non-DVDROM, non-locked).]
If you do select a different parent-folder in the dialogue and then click the 'Choose' button (for a Navigation Services dialogue) or the 'Choose "folder name"' button (for an older Standard File dialogue), that choice would immediately be reflected in the path display item. In addition, the unlabeled 'Custom' radio-button would automatically be selected (if it wasn't already). For example, if you were to choose the 'Documents' folder at the root-level of a volume named 'Heru', then the CP would look as follows:
As mentioned above, remember that the choosing of a new home folder is not a "live" change. It will not take effect until the CP is closed or quit. (In other words, while the CP is still open, the alias-cache folder will remain wherever it was initially; no attempt is made to actually move or copy it into its new home until the CP is closed or quit.)
◊ More Options:
This extra group (visible only when the associated disclosure triangle is opened), contains various options for fine-tuning the behaviour of the CF Extension.
Currently, the controls in the More Options pane are all devoted to allowing you to override the CF Extension's standard implicit exclusions — in other words, these controls allow you to force certain kinds of folders to be tracked. Each of these controls is described next.
◊ ALL volumes > "Package" folders
This option controls whether to track any folder which is either a "package" folder itself, or is a subfolder at any level within such a package folder. [Recall that a package folder is a special kind of folder that groups related items together and is usually treated as a single file by the Finder (e.g., an application package folder can be double-clicked to launch it). Package folders are often used under Mac OS 9 and later.] However, the Mac OS 9.x Finder's contextual menu's 'Show Package Contents' feature does let you navigate inside a package folder as if it were an ordinary folder, opening (and closing) its subfolders as usual.
Normally, you would not want to track a packaged subfolder, since an alias-file which points to it cannot usually be opened via the Apple Menu (unless you leave 'Show Package Contents' active for the package folder). Similarly, you would not want to track a package folder itself, since opening an alias-file which points to it would cause the Finder to launch the application, say, rather than opening the folder (again, unless you leave 'Show Package Contents' active for the package folder). Nevertheless, if you do want to force the tracking of packaged folders and subfolders, then activate this option.
◊ LOCAL volumes > Folders on removable volumes
This option controls whether to track any folder which resides on a local removable ("ejectable") volume. Such volumes include floppy disks, Iomega Zip disks, or even mounted Self Mounting Image (SMI or '.smi') "disks".
Normally, you would not want to track folders on local removable volumes, as nowadays such volumes are typically of a transient nature (e.g., a software-installer SMI "disk"), or are part of a backup set. Nevertheless, if you do want to force the tracking of folders on local removable volumes (e.g., perhaps you use RAM disks extensively), then activate this option.
◊ LOCAL volumes > "Root" folders (volumes)
This option controls whether to track any folder which is the "root" (top-level) folder of a local volume — i.e., the volume itself.
Normally, you would not want to track local volumes' root folders, as they are just a double-click away on the desktop. Nevertheless, if you do want to force the tracking of local volumes' root folders, then activate this option.
Installation
The hardware and OS requirements for using the Closed Folders utility are as follows:
• A PowerPC-based Macintosh.
• Mac OS 8.5—9.2.x.
The decompressed Closed Folders utility folder contains the following items:
• This 'Closed Folders Read Me' document.
• The 'CF Extension Technical Details' document.
• The 'Closed Folders Troubleshooting' document.
• The 'Closed Folders Extension' file [INIT+BOA].
• The 'Closed Folders' file [CP].
To install or re-install the Closed Folders utility, do the following:
• Move or copy the Closed Folders Extension file into the Extensions subfolder of the active System Folder. Optionally, move or copy the Closed Folders file into the Control Panels subfolder of the active System Folder, or simply keep it somewhere convenient (the CP doesn't contain any INIT code, so it doesn't have to be located in the System Folder at all). [Alternatively, you could drag-and-drop the Closed Folders Extension file (and, optionally, the Closed Folders CP) onto the icon of the active System Folder, and then answer 'OK' to the subsequent prompt that informs you of the final destination(s).]
• Reboot your Macintosh. (The CF Extension will not be activated until the Mac is rebooted.)
To uninstall the Closed Folders utility, do the following:
• Turn 'Off' the CF Master control, via the Closed Folders CP.
• Move or copy the Closed Folders Extension file out of the Extensions subfolder of the active System Folder to any other location — e.g., to the Trash (but don't empty it yet). Likewise, move the Closed Folders CP to the Trash.
• if you had moved the CF files to the Trash, then empty the Trash, if desired.
• Optionally, reboot your Macintosh. [Since CF was already deactivated by your turning 'Off' the Master control, it will no longer be active in any way, regardless of whether or not you reboot. However, the (now-useless) INIT code and the custom patch code will still remain resident in memory until the Mac is rebooted.]
Troubleshooting
[This section has now been moved into a separate file. Please see the included 'Closed Folders Support' document.]
Known Problems
[This section has now been moved into a separate file. Please see the included 'Closed Folders Support' document.]
Acknowledgements
Thanks are due to Apple for creating the nifty Start Manager and Trap Manager hooks in Mac OS Classic, which allows system extensions to work their magic. ;-) However, although we mourn the death of these hooks (and thus of all classic-style system extensions) in Mac OS X, we do also appreciate Apple's need to isolate the OS from wayward little critters. Indeed, every time we run Mac OS X on our own computers, it's such a pleasant change not having to reboot just because some errant application or system extension crashed the OS (we haven't even had any "kernel panics" yet, in several months of sustained usage, and our Macs are older beige G3 models!). In any event, if there is sufficient demand, and an equivalent technique can be found, there just might be a version of Closed Folders for Mac OS X in the near future.
Needless to say, the numerous insights gleaned from the Apple Developer Connection (ADC) Sample Code has been invaluable over the years. In particular, the Files group offers the essential MoreFiles library which helps to make the Mac OS File Manager accessible to us mere mortals. In addition, the Human Interface ToolBox group contains several useful examples, ranging from implementing control panels to managing preference files. In addition, we gained much invaluable insight from looking at the patching techniques in the open source code for Wolf Technologies' Respond! CP (now defunct, formerly available at <http://www.wto.com/>).
Thanks are also due to Andrew Gapstr, who originally suggested the idea for the CF utility, way way back on 2nd December 1999, in his 'Want a script to reopen the last folder closed' (<http://newforums.macnn.com/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=16&t=000016>) thread on MacNN's {now-obsolete} Developer Forum. We had subsequently promised to try to implement such a utility, given the necessary free time. After completing some urgent projects at our then employer, we began working on CF seriously in late June 2000, just before relocating from the USA to Guyana in early August 2000. Unfortunately, things have been a bit unsettled since, and what with one thing or another there never seemed to be enough time to finish CF. it was not until September 2001 that work was actively resumed on the utility. Our humble apologies!
This utility was built with Metrowerks CodeWarrior Pro 5 & 6, and Apple's Universal Interfaces 3.3.2. It is written in plain C {not C++}.
Revision History
Version 1.0.1
- Added a 'More Options' pane, to allow finer control over CF's behaviour. If you have been using the first version (1.0) of CF, you might want to take a look at these new options, since their default values are the opposite of what they (implicitly) used to be in version 1.0.
- Fixed problems when running under Mac OS versions prior to OS 9 (i.e., OS 8.5.x and 8.6). The CF Extension was affected by incorrect build options (we forgot to "weak link" to OS 9-specific routines in 'InterfaceLib'); and the CF CP was affected by strange crashes when the threaded Finder loaded & executed its PPC-native 'cdev' code resource. Now, CF actually works as advertised under those earlier OS versions. ;-)
- Fixed an annoying glitch where CF might occasionally cause a server-login dialogue (or disk-insertion prompt) to appear, or an unmounting remote volume to silently remount, as described in item [5] of the Troubleshooting section above.
- Converted the CF CP into a new-style CP with a type-code of 'APPC'. [Actually, we're still internally using a 'cdev' code resource, but we have now made it private (by changing the resource's type-code to 'Cdev') and have implemented a full application "shell" to load and execute it.] In effect, the CP is now a regular native application, and no longer suffers from memory scarcity and other limitations of old-style CPs. At the moment, it is not very scriptable (it supports only core AppleScript commands such as 'run' and 'quit'), but future versions will add more scriptability.
- Made several cosmetic changes in the CF CP, to accommodate the new disclosure triangle and associated 'More Options' pane. In general, the CP window is now wider and shorter, many of the major groups are now framed, and new-style bevel separators replace the old-style outlines ('nrct' rectangles).
Version 1.0
- Initial public release.
Legal Blurb
You may freely use this software, and there is no need to pay or register to do so. However, although this software is free, it is not (yet) in the public domain; in other words, currently all rights are reserved by the author(s).
You may also freely distribute this software but you must include all related files such as any Sample items and this file ('… Read Me') with the copy. However, this software may NOT be distributed in any commercial way without the permission of the author(s).
By using this software, you understand and agree that this software is provided "as is" without warranty of any kind. In no event shall the author(s) be liable for any consequential, incidental, or special damages whatsoever (including, without limitation, damages for loss of critical data, loss of profits, interruption of business and the like) arising out of the use of (or inability to use) this software.